import { Body, Controller, Post, Req } from '@nestjs/common';

import { ApiTags } from '@nestjs/swagger';
import { util_ApiResponse_Base } from '@/common/util/apiResponse';
import { util_Index_ReturnContent } from '@/common/util/index';
import { IRequest } from '@/common/typeScripts';
import { DistributionApply_Service } from '../distributionApply/distributionApply.service';
import { DistributionApply_Create_Dto } from '../distributionApply/assets/distributionApply.dto';

@Controller('/web/distributionApplyWeb')
@ApiTags('distributionApplyWeb 推广者申请列表')
export class DistributionApplyWeb_Controller {
  constructor(private readonly distributionApply_Service: DistributionApply_Service) {}

  @Post('/submit')
  @util_ApiResponse_Base({
    dataType: 'dataType_string',
    description: '提交成功',
    summary: '提交成为固定推广者申请',
  })
  async distributionApply_Web_Submit(@Body() body: DistributionApply_Create_Dto, @Req() req: IRequest) {
    return util_Index_ReturnContent(
      await this.distributionApply_Service.distributionApply_Web_Submit(body, req),
    );
  }
}
